package com.taotao.protal.service;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.taotao.common.pojo.TaotaoResult;
import com.taotao.protal.pojo.CartItem;

/***
 * 购物车service(门户网站)
 * @author Administrator
 *
 */
public interface CartService {
	
	/**
	 * 添加购物车商品
	 * <p>Title: addCartItem</p>
	 * <p>Description: </p>
	 * @param itemId
	 * @param num
	 * @return
	 * @see com.taotao.portal.service.CartService#addCartItem(long, int)
	 */
	public TaotaoResult addCartItem(long itemId, int num, 
			HttpServletRequest request, HttpServletResponse response);
	
	
	/****
	 * 展示购物车<br/>
	 * 从cookie中获取
	 * @param request
	 * @param response
	 * @return
	 */
	public List<CartItem> getCartItemList(HttpServletRequest request, HttpServletResponse response);
	
	/***
	 * 删除购物车中的商品
	 * @param itemId
	 * @param request
	 * @param response
	 * @return
	 */
	public TaotaoResult deleteCartItem(long itemId, HttpServletRequest request, HttpServletResponse response);
}
